package game.model;

public class Grid {
    private int index;
    private ChessType chess;
    private boolean mark;

    public Grid(int index) {
        this.index = index;
    }

    public ChessType getChess() {
        return chess;
    }

    public boolean isEmpty() {
        return chess == null || mark;
    }

    public ChessType remove() {
        ChessType result = chess;
        chess = null;
        return result;
    }

    public void fill(ChessType chess) {
        this.chess = chess;
        mark = false;
    }

    public void setChess(ChessType chess) {
        this.chess = chess;
    }

    public boolean isMark() {
        return mark;
    }

    public void setMark(boolean mark) {
        this.mark = mark;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
